Skip to content

Custom IniParser

Piotr Szkudlarski edited this page Dec 11, 2018 · 5 revisions

If you want to use custom IniParser just call Create method on IniWrapperFactory and pass IIniParser interface.

var iniWrapperFactory = new IniWrapperFactory();
var iniWrapper = iniWrapperFactory.Create(new IniSettings(), new CustomIniParser());

If you want to support IDictionary by custom parser make sure that when Read method is called with null key value method returns whole section formatted just like Windows GetPrivateProfileSection method see implementation of IniParser.cs and IniParserReadDictionaryTests.cs

For example: "test=1\0test2=2\0test3=3"

Clone this wiki locally