Visual Basic (Declaration) | |
---|---|
Function Read( _ ByVal path As String, _ ByVal name As String, _ ByRef value As String _ ) As Boolean |
Parameters
- path
- Optional path for context information
- name
- The name of the property
- value
- Returns the output value if available
Return Value
true if successful or false if data not availableLibrary/Library.Test/TestSerializers.cs
C# | Copy Code |
---|---|
string value; Store.Write(null, "<?a", "b"); Assert.IsTrue(Store.Read(null, "<?a", out value)); Assert.AreEqual("b", value); Assert.IsTrue(Store.Read(String.Empty, "<?a", out value)); Assert.AreEqual("b", value); Store.Write(null, "<?a", "b"); Assert.IsTrue(Store.Read(null, "<?a", out value)); Assert.AreEqual("b", value); Assert.IsTrue(Store.Read(String.Empty, "<?a", out value)); Assert.AreEqual("b", value); Store.Write(">?1/\\", "<?a", "c"); Assert.IsTrue(Store.Read(String.Empty, "<?a", out value)); Assert.AreEqual("b", value); Assert.IsTrue(Store.Read(">?1/\\", "<?a", out value)); Assert.AreEqual("c", value); Store.Delete(">?1/\\", "<?a"); Assert.IsFalse(Store.Read(">?1/\\", "<?a", out value)); Store.Delete(null, "<?a"); Assert.IsFalse(Store.Read(null, "<?a", out value)); Assert.IsFalse(Store.Read(String.Empty, "<?a", out value)); |
VB.NET | Copy Code |
---|---|
Dim value As String Store.Write(Nothing, "<?a", "b") Assert.IsTrue(Store.Read(Nothing, "<?a", value)) Assert.AreEqual("b", value) Assert.IsTrue(Store.Read([String].Empty, "<?a", value)) Assert.AreEqual("b", value) Store.Write(Nothing, "<?a", "b") Assert.IsTrue(Store.Read(Nothing, "<?a", value)) Assert.AreEqual("b", value) Assert.IsTrue(Store.Read([String].Empty, "<?a", value)) Assert.AreEqual("b", value) Store.Write(">?1/\", "<?a", "c") Assert.IsTrue(Store.Read([String].Empty, "<?a", value)) Assert.AreEqual("b", value) Assert.IsTrue(Store.Read(">?1/\", "<?a", value)) Assert.AreEqual("c", value) Store.Delete(">?1/\", "<?a") Assert.IsFalse(Store.Read(">?1/\", "<?a", value)) Store.Delete(Nothing, "<?a") Assert.IsFalse(Store.Read(Nothing, "<?a", value)) Assert.IsFalse(Store.Read([String].Empty, "<?a", value)) |
Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7