Retrieves the current context path of the store
Syntax
Visual Basic (Declaration) | |
---|
Public ReadOnly Property ContextPath As String |
C# | |
---|
public string ContextPath {get;} |
Example
Library/Library.Test/TestStorage.cs
C# | Copy Code |
---|
Assert.IsNull(Store.ContextPath);
using (Store.SetContext("a"))
{
Assert.AreEqual("a", Store.ContextPath);
using (Store.SetContext("b"))
Assert.AreEqual("b", Store.ContextPath);
Assert.AreEqual("a", Store.ContextPath);
}
Assert.IsNull(Store.ContextPath);
using (Store.SetContext("a"))
{
Assert.AreEqual("a", Store.ContextPath);
Store.SetContext("b");
Assert.AreEqual("b", Store.ContextPath);
}
Assert.IsNull(Store.ContextPath); |
VB.NET | Copy Code |
---|
Assert.IsNull(Store.ContextPath)
Using Store.SetContext("a")
Assert.AreEqual("a", Store.ContextPath)
Using Store.SetContext("b")
Assert.AreEqual("b", Store.ContextPath)
End Using
Assert.AreEqual("a", Store.ContextPath)
End Using
Assert.IsNull(Store.ContextPath)
Using Store.SetContext("a")
Assert.AreEqual("a", Store.ContextPath)
Store.SetContext("b")
Assert.AreEqual("b", Store.ContextPath)
End Using
Assert.IsNull(Store.ContextPath) |
Requirements
Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7
See Also