Share via


FindByPropertySpecification Class

FindByPropertySpecification Class

Contains the search specification used in the FindServiceSoap.FindByProperty method. Specifies the property names and values via the find filter, the search options to use, and the data source from which to get results.


Public Class FindByPropertySpecification Inherits System.Object
    

[C#]

public class FindByPropertySpecification : System.Object

Public Properties

Name Description
public propertyDataSourceName

A string representing the name of the data source (DataSource.Name property) in which to search for entities.

public propertyFilter

The filter (FindFilter object) to apply to the results; that is, the specific entity type, properties, and values that the returned results must match. Required.

public propertyOptions

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.

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

  FindByProperty Method