Meteor-Unity  3
A C#-based SDK for connecting Unity to Meteor servers
Public Member Functions | Properties | List of all members
Meteor.Cursor< TRecordType > Class Template Reference

A handle to a query against your client-side document collections. More...

Public Member Functions

Observe< TRecordType > Observe (Action< string, TRecordType > added=null, Action< string, TRecordType, IDictionary, string[]> changed=null, Action< string > removed=null)
 Observes changes for the query specified by the selector. Behaves like Meteor's observe. An observe invokes callbacks when the result of the query changes. The callbacks receive the entire contents of the document that was affected, as well as its old contents, if applicable. Before observe returns, added will be called zero or more times to deliver the initial results of the query. This method returns an Observe instance, which is an object with a stop method. Call stop with no arguments to stop calling the callback functions and tear down the query. The query will run forever until you call this. More...
 
IEnumerable< TRecordType > Fetch ()
 Returns the array of documents matched by this cursor. More...
 

Properties

Collection< TRecordType > collection [get, protected set]
 The collection references in this cursor More...
 
Func< TRecordType, bool > selector [get, protected set]
 The selector used for this cursor More...
 
IEnumerable< string > ids [get, protected set]
 If specified, the array of document IDs that this cursor will match. More...
 

Detailed Description

A handle to a query against your client-side document collections.

Type Constraints
TRecordType :MongoDocument 
TRecordType :new() 

Member Function Documentation

IEnumerable<TRecordType> Meteor.Cursor< TRecordType >.Fetch ( )
inline

Returns the array of documents matched by this cursor.

Observe<TRecordType> Meteor.Cursor< TRecordType >.Observe ( Action< string, TRecordType >  added = null,
Action< string, TRecordType, IDictionary, string[]>  changed = null,
Action< string >  removed = null 
)
inline

Observes changes for the query specified by the selector. Behaves like Meteor's observe. An observe invokes callbacks when the result of the query changes. The callbacks receive the entire contents of the document that was affected, as well as its old contents, if applicable. Before observe returns, added will be called zero or more times to deliver the initial results of the query. This method returns an Observe instance, which is an object with a stop method. Call stop with no arguments to stop calling the callback functions and tear down the query. The query will run forever until you call this.

Parameters
addedA new document document entered the result set.
changedA callback for changes to documents. The first argument is the ID, the second the entire record, the third a dictionary of fields that were changed as keys and the new values as values, and an array of strings specifying any deleted fields. The second argument, the entire document, has the changes already applied to it.
removedA document with the given ID was removed. The callback is called after the document is removed from the collection.

Property Documentation

Collection<TRecordType> Meteor.Cursor< TRecordType >.collection
getprotected set

The collection references in this cursor

The collection.

IEnumerable<string> Meteor.Cursor< TRecordType >.ids
getprotected set

If specified, the array of document IDs that this cursor will match.

The identifiers.

Func<TRecordType, bool> Meteor.Cursor< TRecordType >.selector
getprotected set

The selector used for this cursor

The selector.


The documentation for this class was generated from the following file: