public void Write(string registTarget) { using (var streamWriter = StreramFactory.CreateStreamWriter(_registFilePath)) { streamWriter.WriteLine(registTarget); } }
public string Read() { string registPath; using (var sreamReader = StreramFactory.CreateStreamReader(_registFilePath)) { registPath = sreamReader.ReadToEnd(); } return(registPath); }
private IEnumerable <string> GetRegistlations() { string line; var registlations = new List <string>(); using (var streamReader = StreramFactory.CreateStreamReader(_registlationPath)) { while ((line = streamReader.ReadLine()) != null) { registlations.Add(line); } } return(registlations); }
public void Execute(IEnumerable <string> args) { var arg = args.ToList()[0]; if (!IsExistDataFile()) { File.Create(_registlationPath).Close(); } using (var streamWriter = StreramFactory.CreateStreamWriter(_registlationPath)) { streamWriter.WriteLine(arg); } }