CSMongo.Commands.MongoDatabaseCommands.KillCursors C# (CSharp) Method

KillCursors() public static method

Sends the request to kill existing cursors
public static KillCursors ( MongoDatabase database, IEnumerable cursors ) : void
database MongoDatabase
cursors IEnumerable
return void
        public static void KillCursors(MongoDatabase database, IEnumerable<long> cursors)
        {
            //give up on an empty cursor count
            if (cursors.Count() == 0) { return; }

            //send the command to work
            KillCursorsRequest request = new KillCursorsRequest(cursors);
            QueryResponse response = database.SendRequest(request) as QueryResponse;
        }

Same methods

MongoDatabaseCommands::KillCursors ( MongoDatabase database, IEnumerable cursors ) : void