From: Gerdus v. Z. <ger...@gm...> - 2017-07-17 13:18:53
|
Option 2 - ctor with target version sounds the best. You could name pre3 version enum "Version1" and the new format "Version2" so it's not linked to FB version. A nice to have would be to have default enum value be "DetectVersion" which would do the roundtrip server check. On 17 July 2017 at 14:18, Jiří Činčura <ji...@ci...> wrote: > Hi *, > > Firebird 3 changed the format for trace configuration (yeah, I know) and > thus the FbTrace now needs to handle this. I'm currently banging my head > how to nicely present it to you - developers. I came up with these > solutions. > > 1. Provide 2 methods for starting. Like StartPre3 and Start. I like that > it's discoverable from IntelliSense. And it's just a different method to > call for developer. > 2. Have Start method or ctor take enum with target version. Not sure > about the naming though. Putting "3" might become confusing when v4 > comes out (hopefully without format change). > 3. Have different FbDatabaseTraceConfiguration classes and developer > needs to instantiate correct one. I don't feel this is a clean design > (not that the format change was a good design...). > 4. Have a FbTrace and FbTrace3 (for example). Again as in 3. Maybe bit > easier to discover. Don't like the idea of another class that will be > there "forever". > 5. Before connecting automagically check server version. Although most > pleasant from outside, I don't like the idea of extra roundtrip to get > this information. > > Ideas? > > -- > Mgr. Jiří Činčura > https://www.tabsoverspaces.com/ > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Firebird-net-provider mailing list > Fir...@li... > https://lists.sourceforge.net/lists/listinfo/firebird-net-provider > |