[CSHARP-38] IDocumentFactory Created: 21/Apr/10 Updated: 19/Oct/16 Resolved: 19/Oct/10 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | SAMUS |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | David O'Hara | Assignee: | Sam Corder |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
Since the inclusion of IComparer<string> in Document allows you to push in a specific type of comparer, we needed a way to inject that into documents as they are created on the way out. I introduced an interface IDocumentFactory that you can optionally pass to the Mongo object that will allow for this. Leaving it out causes the default behavior to continue (no comparer). |
| Comments |
| Comment by David O'Hara [ 21/Apr/10 ] |
|
Also, I noticed that you replace the IComparer with IEqualityComparer but these things are not equivalent. Why the change?? |
| Comment by David O'Hara [ 21/Apr/10 ] |
|
Sam, I grabbed the TypedCollections branch from you but it doesn't even compile for me (MongoSymbol is trying to access "this" in it's constructor which is not allowed on a struct). Is this what you're currently using or am I missing something?? |
| Comment by Sam Corder [ 21/Apr/10 ] |
|
David, please look at the typedcollections branch in either my, Steve Wagner (lanwin) or Craig Wilson (craiggwilson) repo and see how what you have fits in there. |