,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.Reactive.Signals
Assembly: ReactiveUI.Primitives.Reactive.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
Summary: Returns the source selected by the dictionary key for each subscription.
Type parameters
| Name | Description |
|---|---|
TKey | The key type. |
T | The value type. |
Parameters
| Name | Type | Description |
|---|---|---|
selector | Func | The selector used to choose the source key. |
sources | IDictionary | The keyed source map. |
Returns: IObservable
2. Overload¶
public static IObservable<T> Case<TKey, T>(Func<TKey> selector, IDictionary<TKey, IObservable<T>> sources, IObservable<T> defaultSource) where TKey : notnull
Summary: Returns the source selected by the dictionary key for each subscription.
Type parameters
| Name | Description |
|---|---|
TKey | The key type. |
T | The value type. |
Parameters
| Name | Type | Description |
|---|---|---|
selector | Func | The selector used to choose the source key. |
sources | IDictionary | The keyed source map. |
defaultSource | IObservable | The source used when the selected key is not present. |
Returns: IObservable