Skip to content

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

ObservableCacheEx.RightJoinMany(IObservable>, IObservable>, Func, Func, IGrouping, 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>> RightJoinMany<TLeft, TLeftKey, TRight, TRightKey, TDestination>(this IObservable<IChangeSet<TLeft, TLeftKey>> left, IObservable<IChangeSet<TRight, TRightKey>> right, Func<TRight, TLeftKey> rightKeySelector, Func<Optional<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>> RightJoinMany<TLeft, TLeftKey, TRight, TRightKey, TDestination>(this IObservable<IChangeSet<TLeft, TLeftKey>> left, IObservable<IChangeSet<TRight, TRightKey>> right, Func<TRight, TLeftKey> rightKeySelector, Func<TLeftKey, Optional<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>> RightJoinMany<TLeft, TLeftKey, TRight, TRightKey, TDestination>(this IObservable<IChangeSet<TLeft, TLeftKey>> left, IObservable<IChangeSet<TRight, TRightKey>> right, Func<TRight, TLeftKey> rightKeySelector, Func<Optional<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 right-joins each group to the left source. A result is produced for every key that has at least one right item. The left value is Optional because a matching left item may or may not exist. Equivalent to SQL RIGHT OUTER 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, IGrouping, TDestination>A Func that combines the optional 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 [RightJoinMany][M:DynamicData.ObservableCacheEx.RightJoinMany--5(System.IObservable},System.IObservable{DynamicData.IChangeSet{--2,--3}},System.Func{--2,--1},System.Func{--1,DynamicData.Kernel.Optional{--0},DynamicData.IGrouping{--2,--3,--1},--4})].

Exceptions

TypeCondition
System.ArgumentNullExceptionAny argument is null.

See also

2. Overload

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

View source

Summary: Groups right-side items by their mapped key, then right-joins each group to the left source. A result is produced for every key that has at least one right item. The left value is Optional because a matching left item may or may not exist. Equivalent to SQL RIGHT OUTER 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, IGrouping, TDestination>A Func that combines the key, optional 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

Right-side change handling:

EventBehavior
AddUpdates the right group. If the group was previously empty, emits an Add with the current left (if any). Otherwise emits an Update.
UpdateUpdates the right group and re-invokes resultSelector.
RemoveUpdates the right group. If the group becomes empty, removes the joined result.
RefreshIf a joined result exists, forwarded as Refresh.

Left-side change handling:

EventBehavior
AddIf a non-empty right group exists, re-invokes the selector (left transitions from None to Some) and emits an Update.
UpdateIf a non-empty right group exists, re-invokes the selector with the new left value.
RemoveIf a non-empty right group exists, re-invokes the selector (left transitions from Some to None) and emits an Update.
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