Share via


FindByPropertySpecification.Options Property

FindByPropertySpecification.Options Property

The search options (FindOptions object), which may include the range of results and a flag to identify which objects are desired in the returned results.


Public Options As FindOptions


[C#]

public FindOptions Options;

Example

[Visual Basic]

    Dim findServiceSoap As FindServiceSoap = New FindServiceSoap
    findServiceSoap.Credentials = _
        New NetworkCredential(myMapPointUserId, mySecurePassword)

    Dim entityPropertyValues As EntityPropertyValue() = New EntityPropertyValue(1) {}
    entityPropertyValues(0) = New EntityPropertyValue
    entityPropertyValues(0).Name = "PrimaryCity"
    entityPropertyValues(0).Value = "Berlin"
    entityPropertyValues(1) = New EntityPropertyValue
    entityPropertyValues(1).Name = "IsWiFiHotSpot"
    entityPropertyValues(1).Value = True
    Dim findByPropertySpecification _
        As FindByPropertySpecification = New FindByPropertySpecification
    findByPropertySpecification.DataSourceName = "MapPoint.FourthCoffeeSample"
    findByPropertySpecification.Filter = New FindFilter
    findByPropertySpecification.Filter.EntityTypeName = "FourthCoffeeShops"
    findByPropertySpecification.Filter.WhereClause = New WhereClause
    findByPropertySpecification.Filter.WhereClause.SearchProperties = entityPropertyValues
    findByPropertySpecification.Filter.WhereClause.SearchOperator = SearchOperatorFlag.And
    Dim findResults As FindResults = findServiceSoap.FindByProperty(findByPropertySpecification)



[C#]

   FindServiceSoap findService = new FindServiceSoap();
   findService.Credentials = 
    new System.Net.NetworkCredential(myMapPointUserId, mySecurePassword);

   EntityPropertyValue[] mySearchProperties = new EntityPropertyValue[2];
   mySearchProperties[0] = new EntityPropertyValue();
   mySearchProperties[0].Name = "PrimaryCity";
   mySearchProperties[0].Value = "Berlin";

   mySearchProperties[1] = new EntityPropertyValue();
   mySearchProperties[1].Name = "IsWiFiHotSpot";
   mySearchProperties[1].Value = true;


   FindByPropertySpecification findbypropspec = 
         new FindByPropertySpecification();

   findbypropspec.DataSourceName = "MapPoint.FourthCoffeeSample";
   findbypropspec.Filter = new FindFilter();
   findbypropspec.Filter.EntityTypeName = "FourthCoffeeShops";

   findbypropspec.Filter.WhereClause = new WhereClause();
   findbypropspec.Filter.WhereClause.SearchProperties = mySearchProperties;
   findbypropspec.Filter.WhereClause.SearchOperator = SearchOperatorFlag.And;

   FindResults foundResults;
   foundResults = findService.FindByProperty(findbypropspec);


See Also

  FindByPropertySpecification Class   |   FindOptions Class   |   FindByProperty Method