Click or drag to resize

DatabaseAddDocumentChangeListener Method (String, EventHandlerDocumentChangedEventArgs)

Adds a document change listener for the document with the given ID. The callback will be invoked on a thread pool thread.

Namespace:  Couchbase.Lite
Assembly:  Couchbase.Lite (in Couchbase.Lite.dll) Version: 2.1.0-b0232
Syntax
C#
public ListenerToken AddDocumentChangeListener(
	string id,
	EventHandler<DocumentChangedEventArgs> handler
)

Parameters

id
Type: SystemString
The document ID
handler
Type: SystemEventHandlerDocumentChangedEventArgs
The logic to handle the event

Return Value

Type: ListenerToken
A ListenerToken that can be used to remove the listener later
Exceptions
ExceptionCondition
ArgumentNullExceptionThrown if handler or id is null
InvalidOperationExceptionThrown if this method is called after the database is closed
See Also