RemoteProvider.Subscribe<TElement> Method (IQueryable<TElement>, IRemoteObserver<TElement>, IScheduler)
Subscribes an observer to an enumerable sequence with the specified source, observer and scheduler.
Namespace: Microsoft.ComplexEventProcessing.Linq
Assembly: Microsoft.ComplexEventProcessing (in Microsoft.ComplexEventProcessing.dll)
Syntax
'Declaration
<ExtensionAttribute> _
Public Shared Function Subscribe(Of TElement) ( _
source As IQueryable(Of TElement), _
observer As IRemoteObserver(Of TElement), _
scheduler As IScheduler _
) As IDisposable
'Usage
Dim source As IQueryable(Of TElement)
Dim observer As IRemoteObserver(Of TElement)
Dim scheduler As IScheduler
Dim returnValue As IDisposable
returnValue = source.Subscribe(observer, _
scheduler)
public static IDisposable Subscribe<TElement>(
this IQueryable<TElement> source,
IRemoteObserver<TElement> observer,
IScheduler scheduler
)
[ExtensionAttribute]
public:
generic<typename TElement>
static IDisposable^ Subscribe(
IQueryable<TElement>^ source,
IRemoteObserver<TElement>^ observer,
IScheduler^ scheduler
)
static member Subscribe :
source:IQueryable<'TElement> *
observer:IRemoteObserver<'TElement> *
scheduler:IScheduler -> IDisposable
JScript does not support generic types and methods.
Type Parameters
- TElement
The sequence element type.
Parameters
- source
Type: System.Linq.IQueryable<TElement>
The enumerable sequence to subscribe to.
- observer
Type: Microsoft.ComplexEventProcessing.Linq.IRemoteObserver<TElement>
The remote observer that will receive notifications from the enumerable sequence.
- scheduler
Type: System.Reactive.Concurrency.IScheduler
The scheduler to perform the enumeration on.
Return Value
Type: System.IDisposable
The disposable object that can be used to unsubscribe the observer from the enumerable.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type IQueryable<TElement>. When you use instance method syntax to call this method, omit the first parameter. For more information, see https://msdn.microsoft.com/en-us/library/bb384936(v=sql.111) or https://msdn.microsoft.com/en-us/library/bb383977(v=sql.111).