CDatabaseFileSystemManager's CreateDirectory/CleanDirectory/DeleteFile had
three identical retry loops differing only in which FolderCreate/FolderClean/
FileDelete ran and the noun in the log line - collapsed into one
RetryFileSystemOp(enum, target, verb, caller) private helper, dispatched by
enum rather than a function pointer (MQL5 function pointers to a built-in
with default params is untested territory, not worth it for 3 one-liners).
CDatabaseVersionManager's ReadStoredDbVersion/UpdateStoredDbVersion had the
same retry shape around FileOpen, differing only in the open flags and the
reading/writing noun - collapsed into OpenVersionFileWithRetry(path, flags,
verb).
CDatabaseConnectionManager::OpenDatabase (the 6th instance the finding named)
is the only retry loop in its file - no in-file duplication to fix there, and
sharing it with the other two would need a cross-class free function bound to
DatabaseOpen/FileOpen as function pointers, an untested construct for a
20-line win. Left as-is.
Every Print() message text verified identical at each call site; public
method signatures unchanged, no external caller needed a rewrite.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>