Bamboo.Prevalence.XPath.XPathObjectNavigator.SelectObject C# (CSharp) 메소드

SelectObject() 공개 메소드

Selects a single object from the current node.
public SelectObject ( string xpath ) : object
xpath string selection expression
리턴 object
		public object SelectObject(string xpath)
		{
			XPathNodeIterator i = Select(xpath);
			if (i.MoveNext())
			{
				return ((XPathObjectNavigator)i.Current).Node;
			}
			return null;
		}

Usage Example

		public void TestIDictionaryProperties()
		{
			Customer customer = new Customer("Rodrigo", "Oliveira", new Address("Penny Lane", 64));
			customer.Properties["email"] = "*****@*****.**";

			XPathObjectNavigator navigator = new XPathObjectNavigator(customer);
			AssertEquals(customer.Properties["email"], navigator.SelectObject("Properties/email"));
		}
All Usage Examples Of Bamboo.Prevalence.XPath.XPathObjectNavigator::SelectObject