[CSHARP-3158] Many abstract classes have the same Render method but do not inherit from a common class/interface Created: 10/Jul/20 Updated: 04/Aug/20 Resolved: 04/Aug/20 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | Christopher Snay | Assignee: | Unassigned |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
To aid in minimizing code repetition for developers who want to write their own extension methods on definition models (FilterDefinition, SortDefinition, etc), it would be helpful if all of the renderable definition models inherited from a common type or interface. |
| Comments |
| Comment by Robert Stam [ 03/Aug/20 ] |
|
Hello christopher.snay@gmail.com, thanks for your suggestion. The Render methods were intended primarily for use by the driver itself, so we really didn't look into abstracting them into an interface. But your suggestions sounded interesting and I looked into it. I found that one reason this isn't very practical is that of the 14 different virtual Render methods I found they have 9 different signatures, and the ones that have the same signature usually have different argument names. So it doesn't look like there really is a viable way to have a single Render method abstracted out into an interface. |
| Comment by Christopher Snay [ 10/Jul/20 ] |
|
This was not supposed to be a bug. I am unable to change the type now. |