NameBuilder¶
NameBuilder generates outbound EDI file names using a fixed, timestamp-prefixed naming pattern, so writer code has a single consistent way to name generated interchange files without formatting the timestamp/environment marker inline at each call site.
Purpose¶
GetFileNameproduces a file name of the form{yyyyMMddHHmmss}_SAIF_{P|T}_{fileType}.txt, where the timestamp is taken fromDateTime.Nowat call time andP/Tmarks a production vs. non-production (test) file (BR-055).- Operates independently of
SAIF.Framework.Common— it usesDateTime.Nowdirectly rather than delegating to a shared date/time or sequence utility.
Context¶
- Namespace:
SAIF.Common.Files.Edi - Assembly/package:
SAIF.Framework.Common.Files
Public members¶
| Member | Signature | Purpose |
|---|---|---|
| GetFileName | public static string GetFileName(string fileType, bool isProd) |
Builds the file name {yyyyMMddHHmmss}_SAIF_{P|T}_{fileType}.txt using DateTime.Now, "P" when isProd is true or "T" otherwise, and the supplied fileType (BR-055). |
Constraints and usage notes¶
- The generated name is only unique to the second; calling
GetFileNametwice within the same second with the same arguments produces an identical name.*
Note: Statements marked with
*were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts.
Sources¶
- Common\SAIF.Common.Files\Edi\NameBuilder.cs