示例#1
0
        private void WriteFile(string filepath, bool containsHeaders)
        {
            try
            {
                if (!string.IsNullOrWhiteSpace(Configuration.EmptyFilesExtension) && !ListContent.Any())
                {
                    filepath = string.Format(filepath + "{0}", Configuration.EmptyFilesExtension);
                }

                SetFilePath(filepath);
                Configuration.SetContainsHeaders(containsHeaders);
                var fileContent = SetFileContent();
                WriteInfile(fileContent);
            }
            catch (Exception)
            {
                throw;
            }
        }