Created
February 14, 2023 20:38
-
-
Save jskeet/abfc4f99150acb66152c7914d0cb2444 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IO; | |
using System.Collections.Generic; | |
public interface IWriterService | |
{ | |
Stream WriteTXT<T>(List<T> content, string delimiter, | |
string header, bool isHeader) | |
where T : class; | |
} | |
public class WriterService : IWriterService | |
{ | |
public WriterService() | |
{ | |
} | |
public Stream WriteTXT<T>(List<T> content, string delimiter, | |
string header, bool isHeader) | |
where T : class | |
{ | |
var stream = new MemoryStream(); | |
// Implementation removed as irrelevant | |
return stream; | |
} | |
} | |
class Test | |
{ | |
static void Main() | |
{ | |
List<string> list = new List<string>(); | |
var service = new WriterService(); | |
service.WriteTXT(list, "x", "y", false); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment