public void TestJavaPropertiesSaveAndLoad() { JavaProperties props = new JavaProperties(); JavaProperties props1 = new JavaProperties(); props.Add("a=", "b=\"''"); props.Store("c:\\tempPropFileCsharp.txt", "comment1"); props1.Load("c:\\tempPropFileCsharp.txt"); File.Delete("c:\\tempPropFileCsharp.txt"); Assert.AreEqual(props1["a="], props["a="]); }
public void Serialize(object obj, Stream writer) { try { JavaProperties props = new JavaProperties(); SerializeFields(emptyPrefix, obj, props); props.Store(writer, null); } catch (IOException e) { throw new TeseWriteException(e); } }