[CSHARP-661] The documentation for FindOne says that it returns a cursor but it returns a DefaultDocument Created: 17/Jan/13  Updated: 04/Mar/13  Resolved: 04/Mar/13

Status: Closed
Project: C# Driver
Component/s: Documentation
Affects Version/s: 1.7
Fix Version/s: 1.8

Type: Bug Priority: Minor - P4
Reporter: Ian Mercer Assignee: Robert Stam
Resolution: Done Votes: 0
Labels: documentation
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

C#



 Description   

Hover over the FindOne method for a typed collection in Visual Studio. The tooltip/help message shows that this method returns a cursor but it doesn't.



 Comments   
Comment by auto [ 04/Mar/13 ]

Author:

{u'date': u'2013-03-04T15:00:08Z', u'name': u'rstam', u'email': u'robert@10gen.com'}

Message: CSHARP-661: Fixed documentation comments for FindOne and FindOneAs.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/af59bffcb94b5e78062fa7b29b17ffd165160a4a

Comment by Robert Stam [ 04/Mar/13 ]

Also corrected the documentation comments for FindOneAs.

Comment by Robert Stam [ 04/Mar/13 ]

What needs correcting is the <summary>, not the <returns>.

Comment by Robert Stam [ 17/Jan/13 ]

I can reproduce this, but it's surprising, because here's the doc comment from the source code:

/// <returns>A TDefaultDocument (or null if not found).</returns>
public virtual TDefaultDocument FindOne(IMongoQuery query)

Thanks for reporting this.

Generated at Wed Feb 07 21:37:28 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.