Skip to content

},System.IObservable{DynamicData.IChangeSet{--2,--3}},System.Func{--2,--1},System.Func{--0,DynamicData.IGrouping{--2,--3,--1},--4})} },System.IObservable{DynamicData.IChangeSet{--2,--3}},System.Func{--2,--1},System.Func{--1,--0,DynamicData.IGrouping{--2,--3,--1},--4})}

ObservableCacheEx.InnerJoinMany(IObservable>, IObservable>, Func, Func, TDestination>) method

Defined in

Type: ObservableCacheEx Namespace: DynamicData Assembly: DynamicData.dll

Applies to

net10.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net9.0, net9.0-browserwasm1.0, net9.0-desktop1.0, net8.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.1, netstandard2.0, net462, net471

Overloads

  • 1. public static IObservable<IChangeSet<TDestination, TLeftKey>> InnerJoinMany<TLeft, TLeftKey, TRight, TRightKey, TDestination>(this IObservable<IChangeSet<TLeft, TLeftKey>> left, IObservable<IChangeSet<TRight, TRightKey>> right, Func<TRight, TLeftKey> rightKeySelector, Func<TLeft, IGrouping<TRight, TRightKey, TLeftKey>, TDestination> resultSelector) where TLeft : notnull where TLeftKey : notnull where TRight : notnull where TRightKey : notnull where TDestination : notnull
  • 2. public static IObservable<IChangeSet<TDestination, TLeftKey>> InnerJoinMany<TLeft, TLeftKey, TRight, TRightKey, TDestination>(this IObservable<IChangeSet<TLeft, TLeftKey>> left, IObservable<IChangeSet<TRight, TRightKey>> right, Func<TRight, TLeftKey> rightKeySelector, Func<TLeftKey, TLeft, IGrouping<TRight, TRightKey, TLeftKey>, TDestination> resultSelector) where TLeft : notnull where TLeftKey : notnull where TRight : notnull where TRightKey : notnull where TDestination : notnull

1. Overload

public static IObservable<IChangeSet<TDestination, TLeftKey>> InnerJoinMany<TLeft, TLeftKey, TRight, TRightKey, TDestination>(this IObservable<IChangeSet<TLeft, TLeftKey>> left, IObservable<IChangeSet<TRight, TRightKey>> right, Func<TRight, TLeftKey> rightKeySelector, Func<TLeft, IGrouping<TRight, TRightKey, TLeftKey>, TDestination> resultSelector) where TLeft : notnull where TLeftKey : notnull where TRight : notnull where TRightKey : notnull where TDestination : notnull

View source

Inherited documentation

These docs were inherited from ObservableCacheEx. The member doesn't override them on this type.

Summary: Groups right-side items by their mapped key, then inner-joins each group to the left source. A result is produced only when a left item and at least one right item share the same key. Equivalent to SQL INNER JOIN with the right side grouped.

Type parameters

NameDescription
TLeftThe item type of the left source.
TLeftKeyThe key type of the left source.
TRightThe item type of the right source.
TRightKeyThe key type of the right source.
TDestinationThe type produced by resultSelector.

Parameters

NameTypeDescription
leftIObservable>The left IObservable<IChangeSet<TLeft, TLeftKey>> to join.
rightIObservable>The right IObservable<IChangeSet<TRight, TRightKey>> to join.
rightKeySelectorFuncA Func that maps each right item to the left key it should join on.
resultSelectorFunc, TDestination>A Func that combines the left value and the right group into a destination object. The key is not provided in this overload.

Returns: IObservable> -- An observable changeset keyed by TLeftKey.

Remarks

Overload that omits the key from the result selector. Delegates to InnerJoinMany.

Exceptions

TypeCondition
System.ArgumentNullExceptionAny argument is null.

See also

2. Overload

public static IObservable<IChangeSet<TDestination, TLeftKey>> InnerJoinMany<TLeft, TLeftKey, TRight, TRightKey, TDestination>(this IObservable<IChangeSet<TLeft, TLeftKey>> left, IObservable<IChangeSet<TRight, TRightKey>> right, Func<TRight, TLeftKey> rightKeySelector, Func<TLeftKey, TLeft, IGrouping<TRight, TRightKey, TLeftKey>, TDestination> resultSelector) where TLeft : notnull where TLeftKey : notnull where TRight : notnull where TRightKey : notnull where TDestination : notnull

:material-source-branch: View source

Summary: Groups right-side items by their mapped key, then inner-joins each group to the left source. A result is produced only when a left item and at least one right item share the same key. Equivalent to SQL INNER JOIN with the right side grouped.

Type parameters

NameDescription
TLeftThe item type of the left source.
TLeftKeyThe key type of the left source.
TRightThe item type of the right source.
TRightKeyThe key type of the right source.
TDestinationThe type produced by resultSelector.

Parameters

NameTypeDescription
leftIObservable>The left IObservable<IChangeSet<TLeft, TLeftKey>> to join.
rightIObservable>The right IObservable<IChangeSet<TRight, TRightKey>> to join.
rightKeySelectorFuncA Func that maps each right item to the left key it should join on.
resultSelectorFunc, TDestination>A Func that combines the key, left value, and right group into a destination object. Example: (key, left, group) => new Result(key, left, group).

Returns: IObservable> -- An observable changeset keyed by TLeftKey.

Remarks

Left-side change handling:

EventBehavior
AddIf a non-empty right group exists for this key, invokes resultSelector and emits an Add. Otherwise no emission.
UpdateIf a right group exists, re-invokes the selector and emits an Update.
RemoveRemoves the joined result (if it was downstream).
RefreshIf a joined result exists, forwarded as Refresh.

Right-side change handling:

EventBehavior
AddUpdates the right group. If a matching left exists and the group was previously empty, emits an Add. If already joined, emits an Update.
UpdateUpdates the right group and re-invokes the selector if a matching left exists.
RemoveUpdates the right group. If the group becomes empty, removes the joined result.
RefreshIf a joined result exists, forwarded as Refresh.

Both sources are serialized through a shared lock held during downstream delivery. Avoid blocking operations in subscribers.

Exceptions

TypeCondition
System.ArgumentNullExceptionAny argument is null.

See also