Bamboo.Prevalence.XPath.XPathObjectNavigator.SelectObjects C# (CSharp) Метод

SelectObjects() публичный Метод

Same as SelectObjects(System.String, System.Type) with returnItemType iguals to typeof(object).
public SelectObjects ( string xpath ) : object[]
xpath string
Результат object[]
		public object[] SelectObjects(string xpath)
		{
			return (object[])SelectObjects(xpath, typeof(object));
		}

Same methods

XPathObjectNavigator::SelectObjects ( string xpath, Type returnItemType ) : Array

Usage Example

		public void TestSelectObjects()
		{
			Address address = new Address("Strawberry Street", 45);
			Customer customer1 = new Customer("Rodrigo", "Oliveira", address);
			Customer customer2 = new Customer("Marcia", "Longo", address);

			Customer[] customers = { customer1, customer2 };
			XPathObjectNavigator navigator = new XPathObjectNavigator(customers);
			object[] actual = navigator.SelectObjects("Customer[Address/Number = 45]");
			AssertEquals(2, actual.Length);
			AssertEquals(customer1, actual[0]);
			AssertEquals(customer2, actual[1]);
		}