Skip to content

,System.Collections.Generic.IDictionary{--0,System.IObservable{--1}})} ,System.Collections.Generic.IDictionary{--0,System.IObservable{--1}},System.IObservable{--1})}

Signal.Case(Func, IDictionary>) method

Defined in

Type: Signal Namespace: ReactiveUI.Primitives.Signals Assembly: ReactiveUI.Primitives.dll

Applies to

net10.0, net10.0-android36.0, net10.0-ios26.0, net10.0-macos26.0, net10.0-tvos26.0, net10.0-maccatalyst26.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net9.0, net9.0-desktop1.0, net9.0-browserwasm1.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, net481, net471, net462

Overloads

  • 1. public static IObservable<T> Case<TKey, T>(Func<TKey> selector, IDictionary<TKey, IObservable<T>> sources) where TKey : notnull
  • 2. public static IObservable<T> Case<TKey, T>(Func<TKey> selector, IDictionary<TKey, IObservable<T>> sources, IObservable<T> defaultSource) where TKey : notnull

1. Overload

public static IObservable<T> Case<TKey, T>(Func<TKey> selector, IDictionary<TKey, IObservable<T>> sources) where TKey : notnull

View source

Summary: Returns the source selected by the dictionary key for each subscription.

Type parameters

NameDescription
TKeyThe key type.
TThe value type.

Parameters

NameTypeDescription
selectorFuncThe selector used to choose the source key.
sourcesIDictionary>The keyed source map.

Returns: IObservable -- A deferred conditional observable sequence.

2. Overload

public static IObservable<T> Case<TKey, T>(Func<TKey> selector, IDictionary<TKey, IObservable<T>> sources, IObservable<T> defaultSource) where TKey : notnull

View source

Summary: Returns the source selected by the dictionary key for each subscription.

Type parameters

NameDescription
TKeyThe key type.
TThe value type.

Parameters

NameTypeDescription
selectorFuncThe selector used to choose the source key.
sourcesIDictionary>The keyed source map.
defaultSourceIObservableThe source used when the selected key is not present.

Returns: IObservable -- A deferred conditional observable sequence.