Validate UseTextForParameters as a file name

Merged
SI
3mo ago
+47-1

The text is appended to the snapshot file name verbatim, with no FileNameCleaner pass, but it was validated with AgainstBadExtension, which only rejects a leading period and directory separators. The sibling naming APIs UseFileName, UseTypeName and UseMethodName all use the file name guard.

So UseTextForParameters($"{time:HH:mm}") put a ':' in the path: on Windows the received write silently went to an NTFS alternate data stream, so no received file appeared at all, and on net4x it failed deep in IO rather than as a clear argument error. '*' and '?' failed at write time.

'#' is rejected too, since it starts the indexed-target namespace and would make one case's files look like another case's targets.