RemoteProvider.Subscribe<TElement> Method (IQueryable<TElement>, IRemoteObserver<TElement>)
Subscribes an observer to an enumerable sequence with the specified source and observer.
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) _
) As IDisposable
'Usage
Dim source As IQueryable(Of TElement)
Dim observer As IRemoteObserver(Of TElement)
Dim returnValue As IDisposable
returnValue = source.Subscribe(observer)
public static IDisposable Subscribe<TElement>(
this IQueryable<TElement> source,
IRemoteObserver<TElement> observer
)
[ExtensionAttribute]
public:
generic<typename TElement>
static IDisposable^ Subscribe(
IQueryable<TElement>^ source,
IRemoteObserver<TElement>^ observer
)
static member Subscribe :
source:IQueryable<'TElement> *
observer:IRemoteObserver<'TElement> -> 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.
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).