Observable.If<TResult> Method
Namespace: Microsoft.Phone.Reactive
Assembly: Microsoft.Phone.Reactive (in Microsoft.Phone.Reactive.dll)
Syntax
'Declaration
Public Shared Function If(Of TResult) ( _
condition As Func(Of Boolean), _
thenSource As IObservable(Of TResult), _
elseSource As IObservable(Of TResult) _
) As IObservable(Of TResult)
public static IObservable<TResult> If<TResult>(
Func<bool> condition,
IObservable<TResult> thenSource,
IObservable<TResult> elseSource
)
public:
generic<typename TResult>
static IObservable<TResult>^ If(
Func<bool>^ condition,
IObservable<TResult>^ thenSource,
IObservable<TResult>^ elseSource
)
static member If :
condition:Func<bool> *
thenSource:IObservable<'TResult> *
elseSource:IObservable<'TResult> -> IObservable<'TResult>
Type Parameters
- TResult
Parameters
- condition
Type: System.Func<Boolean>
- thenSource
Type: System.IObservable<TResult>
- elseSource
Type: System.IObservable<TResult>
Return Value
Type: System.IObservable<TResult>
Version Information
.NET for Windows Phone apps
Supported in: Windows Phone 8, Silverlight 8.1
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.