Mercurial > repos > IBBoard.Ini
comparison IniFileReader.cs @ 2:2dde4c1d19d9
Closes #6 - Create INI parser
* Add more documentation
* Change NonExistantIniSection so that the constructor won't cause an exception
* Fix IniFileReader so that the reading from string actually reads from the parameter
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Mon, 12 Jan 2009 20:34:07 +0000 |
parents | f9444f1786cd |
children | f6f726c92e56 |
comparison
equal
deleted
inserted
replaced
1:f9444f1786cd | 2:2dde4c1d19d9 |
---|---|
10 { | 10 { |
11 public class IniFileReader | 11 public class IniFileReader |
12 { | 12 { |
13 public static IniFile ReadFile(string iniFileContent) | 13 public static IniFile ReadFile(string iniFileContent) |
14 { | 14 { |
15 MemoryStream memoryStream = new MemoryStream(System.Text.ASCIIEncoding.ASCII.GetBytes("test")); | 15 MemoryStream memoryStream = new MemoryStream(System.Text.ASCIIEncoding.ASCII.GetBytes(iniFileContent)); |
16 return LoadIniFileFromStream(new StreamReader(memoryStream)); | 16 return LoadIniFileFromStream(new StreamReader(memoryStream)); |
17 } | 17 } |
18 | 18 |
19 public static IniFile ReadFile(FileInfo file) | 19 public static IniFile ReadFile(FileInfo file) |
20 { | 20 { |