public bool IsValidLogFileName(string fileName) { WasLastFileNameValid = false; IExtensionManager mgr = new FileExtensionManager(); if (string.IsNullOrEmpty(fileName)) { throw new ArgumentException("filename has to be provided"); } //if (!File.Exists(fileName)) //{ // throw new Exception("No log file with that name exists"); //} if (!fileName.EndsWith(".slf", StringComparison.CurrentCultureIgnoreCase)) { return(mgr.IsValid(fileName)); } WasLastFileNameValid = true; return(mgr.IsValid(fileName)); }
protected virtual bool IsValid(string fileName) { FileExtensionManager mgr = new FileExtensionManager(); return(mgr.IsValid(fileName)); }