Class ParallelOperators
- Namespace
- Dynamic
Data .PLinq
- Assembly
- DynamicData.dll
PLinq operators or Net4 and Net45 only.
- Inheritance
-
Parallel
Operators
Methods
Filter<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, bool>, ParallelisationOptions)
Filters the stream using the specified predicate.
public static IObservable<IChangeSet<TObject, TKey>> Filter<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, Func<TObject, bool> filter, ParallelisationOptions parallelisationOptions) where TObject : notnull where TKey : notnull
Parameters
source
IObservable<IChangeSet <TObject, TKey>>The source.
filter
Func<TObject, bool>The filter.
parallelisationOptions
ParallelisationOptions The parallelisation options.
Returns
- IObservable<IChange
Set <TObject, TKey>> An observable which emits a change set.
Type Parameters
TObject
The type of the object.
TKey
The type of the key.
Exceptions
- Argument
Null Exception source.
SubscribeMany<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, IDisposable>, ParallelisationOptions)
Subscribes to each item when it is added to the stream and unsubscribes when it is removed. All items will be unsubscribed when the stream is disposed.
public static IObservable<IChangeSet<TObject, TKey>> SubscribeMany<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, Func<TObject, IDisposable> subscriptionFactory, ParallelisationOptions parallelisationOptions) where TObject : notnull where TKey : notnull
Parameters
source
IObservable<IChangeSet <TObject, TKey>>The source.
subscriptionFactory
Func<TObject, IDisposable>The subscription function.
parallelisationOptions
ParallelisationOptions The parallelisation options.
Returns
- IObservable<IChange
Set <TObject, TKey>> An observable which emits a change set.
Type Parameters
TObject
The type of the object.
TKey
The type of the key.
Remarks
Subscribes to each item when it is added or updates and unsubscribes when it is removed.
Exceptions
- Argument
Null Exception source or subscriptionFactory.
SubscribeMany<TObject, TKey>(IObservable<IChangeSet<TObject, TKey>>, Func<TObject, TKey, IDisposable>, ParallelisationOptions)
Subscribes to each item when it is added to the stream and unsubscribes when it is removed. All items will be unsubscribed when the stream is disposed.
public static IObservable<IChangeSet<TObject, TKey>> SubscribeMany<TObject, TKey>(this IObservable<IChangeSet<TObject, TKey>> source, Func<TObject, TKey, IDisposable> subscriptionFactory, ParallelisationOptions parallelisationOptions) where TObject : notnull where TKey : notnull
Parameters
source
IObservable<IChangeSet <TObject, TKey>>The source.
subscriptionFactory
Func<TObject, TKey, IDisposable>The subscription function.
parallelisationOptions
ParallelisationOptions The parallelisation options.
Returns
- IObservable<IChange
Set <TObject, TKey>> An observable which emits a change set.
Type Parameters
TObject
The type of the object.
TKey
The type of the key.
Remarks
Subscribes to each item when it is added or updates and unsubscribes when it is removed.
Exceptions
- Argument
Null Exception source or subscriptionFactory.
TransformSafe<TDestination, TSource, TKey>(IObservable<IChangeSet<TSource, TKey>>, Func<TSource, TDestination>, Action<Error<TSource, TKey>>, ParallelisationOptions)
Projects each update item to a new form using the specified transform function, providing an error handling action to safely handle transform errors without killing the stream.
public static IObservable<IChangeSet<TDestination, TKey>> TransformSafe<TDestination, TSource, TKey>(this IObservable<IChangeSet<TSource, TKey>> source, Func<TSource, TDestination> transformFactory, Action<Error<TSource, TKey>> errorHandler, ParallelisationOptions parallelisationOptions) where TDestination : notnull where TSource : notnull where TKey : notnull
Parameters
source
IObservable<IChangeSet <TSource, TKey>>The source.
transformFactory
Func<TSource, TDestination>The transform factory.
errorHandler
Action<Error<TSource, TKey>>Provides the option to safely handle errors without killing the stream. If not specified the stream will terminate as per rx convention.
parallelisationOptions
ParallelisationOptions The parallelisation options.
Returns
- IObservable<IChange
Set <TDestination, TKey>> A transformed update collection.
Type Parameters
TDestination
The type of the destination.
TSource
The type of the source.
TKey
The type of the key.
Exceptions
- Argument
Null Exception source or transformFactory.
TransformSafe<TDestination, TSource, TKey>(IObservable<IChangeSet<TSource, TKey>>, Func<TSource, TKey, TDestination>, Action<Error<TSource, TKey>>, ParallelisationOptions)
Projects each update item to a new form using the specified transform function, providing an error handling action to safely handle transform errors without killing the stream.
public static IObservable<IChangeSet<TDestination, TKey>> TransformSafe<TDestination, TSource, TKey>(this IObservable<IChangeSet<TSource, TKey>> source, Func<TSource, TKey, TDestination> transformFactory, Action<Error<TSource, TKey>> errorHandler, ParallelisationOptions parallelisationOptions) where TDestination : notnull where TSource : notnull where TKey : notnull
Parameters
source
IObservable<IChangeSet <TSource, TKey>>The source.
transformFactory
Func<TSource, TKey, TDestination>The transform factory.
errorHandler
Action<Error<TSource, TKey>>Provides the option to safely handle errors without killing the stream. If not specified the stream will terminate as per rx convention.
parallelisationOptions
ParallelisationOptions The parallelisation options to be used on the transforms.
Returns
- IObservable<IChange
Set <TDestination, TKey>> A transformed update collection.
Type Parameters
TDestination
The type of the destination.
TSource
The type of the source.
TKey
The type of the key.
Exceptions
- Argument
Null Exception source or transformFactory.
Transform<TDestination, TSource, TKey>(IObservable<IChangeSet<TSource, TKey>>, Func<TSource, TDestination>, ParallelisationOptions)
Projects each update item to a new form using the specified transform function.
public static IObservable<IChangeSet<TDestination, TKey>> Transform<TDestination, TSource, TKey>(this IObservable<IChangeSet<TSource, TKey>> source, Func<TSource, TDestination> transformFactory, ParallelisationOptions parallelisationOptions) where TDestination : notnull where TSource : notnull where TKey : notnull
Parameters
source
IObservable<IChangeSet <TSource, TKey>>The source.
transformFactory
Func<TSource, TDestination>The transform factory.
parallelisationOptions
ParallelisationOptions The parallelisation options.
Returns
- IObservable<IChange
Set <TDestination, TKey>> A transformed update collection.
Type Parameters
TDestination
The type of the destination.
TSource
The type of the source.
TKey
The type of the key.
Exceptions
- Argument
Null Exception source or transformFactory.
Transform<TDestination, TSource, TKey>(IObservable<IChangeSet<TSource, TKey>>, Func<TSource, TKey, TDestination>, ParallelisationOptions)
Projects each update item to a new form using the specified transform function.
public static IObservable<IChangeSet<TDestination, TKey>> Transform<TDestination, TSource, TKey>(this IObservable<IChangeSet<TSource, TKey>> source, Func<TSource, TKey, TDestination> transformFactory, ParallelisationOptions parallelisationOptions) where TDestination : notnull where TSource : notnull where TKey : notnull
Parameters
source
IObservable<IChangeSet <TSource, TKey>>The source.
transformFactory
Func<TSource, TKey, TDestination>The transform factory.
parallelisationOptions
ParallelisationOptions The parallelisation options to be used on the transforms.
Returns
- IObservable<IChange
Set <TDestination, TKey>> A transformed update collection.
Type Parameters
TDestination
The type of the destination.
TSource
The type of the source.
TKey
The type of the key.
Exceptions
- Argument
Null Exception source or transformFactory.