public void Dispose() { if(Command.KeepTemp || _disposing) return; _disposing = true; if(Result == null || Result.Ok == false) return; //Nothing to do. //Drop the temporary collection that was created as part of results. if (Result.CollectionName != null) _database.Metadata.DropCollection(Result.CollectionName); }