Table of Contents

Class AvgEx

Namespace
DynamicData.Aggregation
Assembly
DynamicData.dll

Average extensions.

public static class AvgEx
Inheritance
AvgEx

Methods

Avg<T>(IObservable<IAggregateChangeSet<T>>, Func<T, decimal>, decimal)

Continuous calculation of the average of the underlying data source.

public static IObservable<decimal> Avg<T>(this IObservable<IAggregateChangeSet<T>> source, Func<T, decimal> valueSelector, decimal emptyValue = 0)

Parameters

source IObservable<IAggregateChangeSet<T>>

The source observable.

valueSelector Func<T, decimal>

The function which returns the value.

emptyValue decimal

The resulting average value when there is no data.

Returns

IObservable<decimal>

An observable of averages.

Type Parameters

T

The type to average.

Avg<T>(IObservable<IAggregateChangeSet<T>>, Func<T, double>, double)

Continuous calculation of the average of the underlying data source.

public static IObservable<double> Avg<T>(this IObservable<IAggregateChangeSet<T>> source, Func<T, double> valueSelector, double emptyValue = 0)

Parameters

source IObservable<IAggregateChangeSet<T>>

The source observable.

valueSelector Func<T, double>

The function which returns the value.

emptyValue double

The resulting average value when there is no data.

Returns

IObservable<double>

An observable of averages.

Type Parameters

T

The type to average.

Avg<T>(IObservable<IAggregateChangeSet<T>>, Func<T, int>, int)

Continuous calculation of the average of the underlying data source.

public static IObservable<double> Avg<T>(this IObservable<IAggregateChangeSet<T>> source, Func<T, int> valueSelector, int emptyValue = 0)

Parameters

source IObservable<IAggregateChangeSet<T>>

The source observable.

valueSelector Func<T, int>

The function which returns the value.

emptyValue int

The resulting average value when there is no data.

Returns

IObservable<double>

An observable of averages.

Type Parameters

T

The type to average.

Avg<T>(IObservable<IAggregateChangeSet<T>>, Func<T, long>, long)

Averages the specified value selector.

public static IObservable<double> Avg<T>(this IObservable<IAggregateChangeSet<T>> source, Func<T, long> valueSelector, long emptyValue = 0)

Parameters

source IObservable<IAggregateChangeSet<T>>

The source.

valueSelector Func<T, long>

The value selector.

emptyValue long

The empty value.

Returns

IObservable<double>

An observable of averages as a double value.

Type Parameters

T

The type to average.

Avg<T>(IObservable<IAggregateChangeSet<T>>, Func<T, decimal?>, decimal)

Averages the specified value selector.

public static IObservable<decimal> Avg<T>(this IObservable<IAggregateChangeSet<T>> source, Func<T, decimal?> valueSelector, decimal emptyValue = 0)

Parameters

source IObservable<IAggregateChangeSet<T>>

The source.

valueSelector Func<T, decimal?>

The value selector.

emptyValue decimal

The empty value.

Returns

IObservable<decimal>

An observable of decimals with the averaged values.

Type Parameters

T

The type to average.

Avg<T>(IObservable<IAggregateChangeSet<T>>, Func<T, double?>, double)

Continuous calculation of the average of the underlying data source.

public static IObservable<double> Avg<T>(this IObservable<IAggregateChangeSet<T>> source, Func<T, double?> valueSelector, double emptyValue = 0)

Parameters

source IObservable<IAggregateChangeSet<T>>

The source observable.

valueSelector Func<T, double?>

The function which returns the value.

emptyValue double

The resulting average value when there is no data.

Returns

IObservable<double>

An observable of averages.

Type Parameters

T

The type to average.

Avg<T>(IObservable<IAggregateChangeSet<T>>, Func<T, int?>, int)

Continuous calculation of the average of the underlying data source.

public static IObservable<double> Avg<T>(this IObservable<IAggregateChangeSet<T>> source, Func<T, int?> valueSelector, int emptyValue = 0)

Parameters

source IObservable<IAggregateChangeSet<T>>

The source observable.

valueSelector Func<T, int?>

The function which returns the value.

emptyValue int

The resulting average value when there is no data.

Returns

IObservable<double>

An observable of averages.

Type Parameters

T

The type to average.

Avg<T>(IObservable<IAggregateChangeSet<T>>, Func<T, long?>, long)

Continuous calculation of the average of the underlying data source.

public static IObservable<double> Avg<T>(this IObservable<IAggregateChangeSet<T>> source, Func<T, long?> valueSelector, long emptyValue = 0)

Parameters

source IObservable<IAggregateChangeSet<T>>

The source observable.

valueSelector Func<T, long?>

The function which returns the value.

emptyValue long

The resulting average value when there is no data.

Returns

IObservable<double>

An observable of averages.

Type Parameters

T

The type to average.

Avg<T>(IObservable<IAggregateChangeSet<T>>, Func<T, float?>, float)

Continuous calculation of the average of the underlying data source.

public static IObservable<float> Avg<T>(this IObservable<IAggregateChangeSet<T>> source, Func<T, float?> valueSelector, float emptyValue = 0)

Parameters

source IObservable<IAggregateChangeSet<T>>

The source observable.

valueSelector Func<T, float?>

The function which returns the value.

emptyValue float

The resulting average value when there is no data.

Returns

IObservable<float>

An observable of averages.

Type Parameters

T

The type to average.

Avg<T>(IObservable<IAggregateChangeSet<T>>, Func<T, float>, float)

Continuous calculation of the average of the underlying data source.

public static IObservable<float> Avg<T>(this IObservable<IAggregateChangeSet<T>> source, Func<T, float> valueSelector, float emptyValue = 0)

Parameters

source IObservable<IAggregateChangeSet<T>>

The source observable.

valueSelector Func<T, float>

The function which returns the value.

emptyValue float

The resulting average value when there is no data.

Returns

IObservable<float>

An observable of averages.

Type Parameters

T

The type to average.

Avg<T>(IObservable<IChangeSet<T>>, Func<T, decimal>, decimal)

Continuous calculation of the average of the underlying data source.

public static IObservable<decimal> Avg<T>(this IObservable<IChangeSet<T>> source, Func<T, decimal> valueSelector, decimal emptyValue = 0) where T : notnull

Parameters

source IObservable<IChangeSet<T>>

The source observable.

valueSelector Func<T, decimal>

The function which returns the value.

emptyValue decimal

The resulting average value when there is no data.

Returns

IObservable<decimal>

An observable of averages.

Type Parameters

T

The type to average.

Avg<T>(IObservable<IChangeSet<T>>, Func<T, double>, double)

Continuous calculation of the average of the underlying data source.

public static IObservable<double> Avg<T>(this IObservable<IChangeSet<T>> source, Func<T, double> valueSelector, double emptyValue = 0) where T : notnull

Parameters

source IObservable<IChangeSet<T>>

The source observable.

valueSelector Func<T, double>

The function which returns the value.

emptyValue double

The resulting average value when there is no data.

Returns

IObservable<double>

An observable of averages.

Type Parameters

T

The type to average.

Avg<T>(IObservable<IChangeSet<T>>, Func<T, int>, int)

Continuous calculation of the average of the underlying data source.

public static IObservable<double> Avg<T>(this IObservable<IChangeSet<T>> source, Func<T, int> valueSelector, int emptyValue = 0) where T : notnull

Parameters

source IObservable<IChangeSet<T>>

The source observable.

valueSelector Func<T, int>

The function which returns the value.

emptyValue int

The resulting average value when there is no data.

Returns

IObservable<double>

An observable of averages.

Type Parameters

T

The type to average.

Avg<T>(IObservable<IChangeSet<T>>, Func<T, long>, long)

Continuous calculation of the average of the underlying data source.

public static IObservable<double> Avg<T>(this IObservable<IChangeSet<T>> source, Func<T, long> valueSelector, long emptyValue = 0) where T : notnull

Parameters

source IObservable<IChangeSet<T>>

The source observable.

valueSelector Func<T, long>

The function which returns the value.

emptyValue long

The resulting average value when there is no data.

Returns

IObservable<double>

An observable of averages.

Type Parameters

T

The type to average.

Avg<T>(IObservable<IChangeSet<T>>, Func<T, decimal?>, decimal)

Continuous calculation of the average of the underlying data source.

public static IObservable<decimal> Avg<T>(this IObservable<IChangeSet<T>> source, Func<T, decimal?> valueSelector, decimal emptyValue = 0) where T : notnull

Parameters

source IObservable<IChangeSet<T>>

The source observable.

valueSelector Func<T, decimal?>

The function which returns the value.

emptyValue decimal

The resulting average value when there is no data.

Returns

IObservable<decimal>

An observable of averages.

Type Parameters

T

The type to average.

Avg<T>(IObservable<IChangeSet<T>>, Func<T, double?>, double)

Continuous calculation of the average of the underlying data source.

public static IObservable<double> Avg<T>(this IObservable<IChangeSet<T>> source, Func<T, double?> valueSelector, double emptyValue = 0) where T : notnull

Parameters

source IObservable<IChangeSet<T>>

The source observable.

valueSelector Func<T, double?>

The function which returns the value.

emptyValue double

The resulting average value when there is no data.

Returns

IObservable<double>

An observable of averages.

Type Parameters

T

The type to average.

Avg<T>(IObservable<IChangeSet<T>>, Func<T, int?>, int)

Continuous calculation of the average of the underlying data source.

public static IObservable<double> Avg<T>(this IObservable<IChangeSet<T>> source, Func<T, int?> valueSelector, int emptyValue = 0) where T : notnull

Parameters

source IObservable<IChangeSet<T>>

The source observable.

valueSelector Func<T, int?>

The function which returns the value.

emptyValue int

The resulting average value when there is no data.

Returns

IObservable<double>

An observable of averages.

Type Parameters

T

The type to average.

Avg<T>(IObservable<IChangeSet<T>>, Func<T, long?>, long)

Continuous calculation of the average of the underlying data source.

public static IObservable<double> Avg<T>(this IObservable<IChangeSet<T>> source, Func<T, long?> valueSelector, long emptyValue = 0) where T : notnull

Parameters

source IObservable<IChangeSet<T>>

The source observable.

valueSelector Func<T, long?>

The function which returns the value.

emptyValue long

The resulting average value when there is no data.

Returns

IObservable<double>

An observable of averages.

Type Parameters

T

The type to average.

Avg<T>(IObservable<IChangeSet<T>>, Func<T, float?>, float)

Continuous calculation of the average of the underlying data source.

public static IObservable<float> Avg<T>(this IObservable<IChangeSet<T>> source, Func<T, float?> valueSelector, float emptyValue = 0) where T : notnull

Parameters

source IObservable<IChangeSet<T>>

The source observable.

valueSelector Func<T, float?>

The function which returns the value.

emptyValue float

The resulting average value when there is no data.

Returns

IObservable<float>

An observable of averages.

Type Parameters

T

The type to average.

Avg<T>(IObservable<IChangeSet<T>>, Func<T, float>, float)

Continuous calculation of the average of the underlying data source.

public static IObservable<float> Avg<T>(this IObservable<IChangeSet<T>> source, Func<T, float> valueSelector, float emptyValue = 0) where T : notnull

Parameters

source IObservable<IChangeSet<T>>

The source observable.

valueSelector Func<T, float>

The function which returns the value.

emptyValue float

The resulting average value when there is no data.

Returns

IObservable<float>

An observable of averages.

Type Parameters

T

The type to average.

Avg<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, decimal>, decimal)

Continuous calculation of the average of the underlying data source.

public static IObservable<decimal> Avg<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, Func<TObject, decimal> valueSelector, decimal emptyValue = 0) where TObject : notnull where TKey : notnull

Parameters

source IObservable<IChangeSet<TObject, TKey>>

The source observable.

valueSelector Func<TObject, decimal>

The function which returns the value.

emptyValue decimal

The resulting average value when there is no data.

Returns

IObservable<decimal>

An observable of averages.

Type Parameters

TObject

The type of the object.

TKey

The type of the key.

Avg<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, double>, double)

Continuous calculation of the average of the underlying data source.

public static IObservable<double> Avg<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, Func<TObject, double> valueSelector, double emptyValue = 0) where TObject : notnull where TKey : notnull

Parameters

source IObservable<IChangeSet<TObject, TKey>>

The source observable.

valueSelector Func<TObject, double>

The function which returns the value.

emptyValue double

The resulting average value when there is no data.

Returns

IObservable<double>

An observable of averages.

Type Parameters

TObject

The type of the object.

TKey

The type of the key.

Avg<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, int>, int)

Continuous calculation of the average of the underlying data source.

public static IObservable<double> Avg<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, Func<TObject, int> valueSelector, int emptyValue = 0) where TObject : notnull where TKey : notnull

Parameters

source IObservable<IChangeSet<TObject, TKey>>

The source observable.

valueSelector Func<TObject, int>

The function which returns the value.

emptyValue int

The resulting average value when there is no data.

Returns

IObservable<double>

An observable of averages.

Type Parameters

TObject

The type of the object.

TKey

The type of the key.

Avg<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, long>, long)

Continuous calculation of the average of the underlying data source.

public static IObservable<double> Avg<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, Func<TObject, long> valueSelector, long emptyValue = 0) where TObject : notnull where TKey : notnull

Parameters

source IObservable<IChangeSet<TObject, TKey>>

The source observable.

valueSelector Func<TObject, long>

The function which returns the value.

emptyValue long

The resulting average value when there is no data.

Returns

IObservable<double>

An observable of averages.

Type Parameters

TObject

The type of the object.

TKey

The type of the key.

Avg<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, decimal?>, decimal)

Continuous calculation of the average of the underlying data source.

public static IObservable<decimal> Avg<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, Func<TObject, decimal?> valueSelector, decimal emptyValue = 0) where TObject : notnull where TKey : notnull

Parameters

source IObservable<IChangeSet<TObject, TKey>>

The source observable.

valueSelector Func<TObject, decimal?>

The function which returns the value.

emptyValue decimal

The resulting average value when there is no data.

Returns

IObservable<decimal>

An observable of averages.

Type Parameters

TObject

The type of the object.

TKey

The type of the key.

Avg<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, double?>, double)

Continuous calculation of the average of the underlying data source.

public static IObservable<double> Avg<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, Func<TObject, double?> valueSelector, double emptyValue = 0) where TObject : notnull where TKey : notnull

Parameters

source IObservable<IChangeSet<TObject, TKey>>

The source observable.

valueSelector Func<TObject, double?>

The function which returns the value.

emptyValue double

The resulting average value when there is no data.

Returns

IObservable<double>

An observable of averages.

Type Parameters

TObject

The type of the object.

TKey

The type of the key.

Avg<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, int?>, int)

Continuous calculation of the average of the underlying data source.

public static IObservable<double> Avg<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, Func<TObject, int?> valueSelector, int emptyValue = 0) where TObject : notnull where TKey : notnull

Parameters

source IObservable<IChangeSet<TObject, TKey>>

The source observable.

valueSelector Func<TObject, int?>

The function which returns the value.

emptyValue int

The resulting average value when there is no data.

Returns

IObservable<double>

An observable of averages.

Type Parameters

TObject

The type of the object.

TKey

The type of the key.

Avg<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, long?>, long)

Continuous calculation of the average of the underlying data source.

public static IObservable<double> Avg<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, Func<TObject, long?> valueSelector, long emptyValue = 0) where TObject : notnull where TKey : notnull

Parameters

source IObservable<IChangeSet<TObject, TKey>>

The source observable.

valueSelector Func<TObject, long?>

The function which returns the value.

emptyValue long

The resulting average value when there is no data.

Returns

IObservable<double>

An observable of averages.

Type Parameters

TObject

The type of the object.

TKey

The type of the key.

Avg<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, float?>, float)

Continuous calculation of the average of the underlying data source.

public static IObservable<float> Avg<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, Func<TObject, float?> valueSelector, float emptyValue = 0) where TObject : notnull where TKey : notnull

Parameters

source IObservable<IChangeSet<TObject, TKey>>

The source observable.

valueSelector Func<TObject, float?>

The function which returns the value.

emptyValue float

The resulting average value when there is no data.

Returns

IObservable<float>

An observable of averages.

Type Parameters

TObject

The type of the object.

TKey

The type of the key.

Avg<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, float>, float)

Continuous calculation of the average of the underlying data source.

public static IObservable<float> Avg<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, Func<TObject, float> valueSelector, float emptyValue = 0) where TObject : notnull where TKey : notnull

Parameters

source IObservable<IChangeSet<TObject, TKey>>

The source observable.

valueSelector Func<TObject, float>

The function which returns the value.

emptyValue float

The resulting average value when there is no data.

Returns

IObservable<float>

An observable of averages.

Type Parameters

TObject

The type of the object.

TKey

The type of the key.