/// <summary> /// Получить имя файла конфигурации /// </summary> public static string GetFileName(string configDir, int kpNum, string cmdLine) { string shortFileName = string.IsNullOrEmpty(cmdLine) ? "KpSnmp_" + CommUtils.AddZeros(kpNum, 3) + ".xml" : cmdLine.Trim(); return(Path.Combine(configDir, shortFileName)); }
private readonly RuntimeKind runtime; // the runtime kind /// <summary> /// Initializes a new instance of the class. /// </summary> public OpcUaHelper(AppDirs appDirs, int kpNum, RuntimeKind runtime) { this.appDirs = appDirs ?? throw new ArgumentNullException("appDirs"); kpNumStr = CommUtils.AddZeros(kpNum, 3); this.runtime = runtime; AutoAccept = false; OpcSession = null; CertificateValidation = null; WriteToLog = (string text) => { }; // stub }
/// <summary> /// Получить имя файла конфигурации /// </summary> public static string GetFileName(string configDir, int kpNum) { return(configDir + "KpOpcUA_" + CommUtils.AddZeros(kpNum, 3) + ".xml"); }
/// <summary> /// Gets the configuration file name. /// </summary> public static string GetFileName(string configDir, int kpNum) { return(Path.Combine(configDir, "KpHttpNotif_" + CommUtils.AddZeros(kpNum, 3) + ".xml")); }
/// <summary> /// Gets the configuration file name. /// </summary> public static string GetFileName(string configDir, int kpNum, string defaultFileName) { return(string.IsNullOrWhiteSpace(defaultFileName) ? Path.Combine(configDir, "KpMqtt_" + CommUtils.AddZeros(kpNum, 3) + ".xml") : Path.Combine(configDir, defaultFileName.Trim())); }