C# Class Rock.Model.LocationService

Data access and service class for Rock.Model.Location entities.
Afficher le fichier Open project: SparkDevNetwork/Rock Class Usage Examples

Méthodes publiques

Méthode Description
Get ( string street1, string street2, string city, string state, string postalCode, string country, bool verifyLocation = true ) : Location

Returns the first Rock.Model.Location where the address matches the provided address. If no address is found with the provided values, the address will be standardized. If there is still not a match, the address will be saved as a new location.

GetAllAncestorIds ( int locationId ) : IEnumerable

Gets all ancestor ids.

GetAllAncestors ( int locationId ) : IEnumerable

Gets all ancestors.

GetAllDescendentIds ( int parentLocationId ) : IEnumerable

Gets all descendent ids.

GetAllDescendents ( int parentLocationId ) : IEnumerable

Returns an enumerable collection of Rock.Model.Location">Locations that are descendants of a

GetByDevice ( int deviceId, bool includeChildLocations = true ) : IEnumerable

Gets the locations associated to a device and optionally any child locaitons

GetByGeoFence ( System.Data.Entity.Spatial.DbGeography fence ) : Location

Returns the first Rock.Model.Location with a GeoFence that matches the specified GeoFence.

GetByGeoPoint ( System.Data.Entity.Spatial.DbGeography point ) : Location

Returns a Rock.Model.Location by GeoPoint. If a match is not found, a new Location will be added based on the Geopoint.

GetCampusIdForLocation ( int locationId ) : int?

Gets the CampusID associated with the Location from the location or from the location's parent path

GetPath ( int locationId ) : string

Gets the path.

Verify ( Location location, bool reVerify ) : bool

Performs Address Verification on the provided Rock.Model.Location.

Method Details

Get() public méthode

Returns the first Rock.Model.Location where the address matches the provided address. If no address is found with the provided values, the address will be standardized. If there is still not a match, the address will be saved as a new location.
public Get ( string street1, string street2, string city, string state, string postalCode, string country, bool verifyLocation = true ) : Location
street1 string A representing the Address Line 1 to search by.
street2 string A representing the Address Line 2 to search by.
city string A representing the City to search by.
state string A representing the State to search by.
postalCode string A representing the Zip/Postal code to search by
country string The country.
verifyLocation bool if set to true [verify location].
Résultat Location

GetAllAncestorIds() public méthode

Gets all ancestor ids.
public GetAllAncestorIds ( int locationId ) : IEnumerable
locationId int The location identifier.
Résultat IEnumerable

GetAllAncestors() public méthode

Gets all ancestors.
public GetAllAncestors ( int locationId ) : IEnumerable
locationId int The location identifier.
Résultat IEnumerable

GetAllDescendentIds() public méthode

Gets all descendent ids.
public GetAllDescendentIds ( int parentLocationId ) : IEnumerable
parentLocationId int The parent location identifier.
Résultat IEnumerable

GetAllDescendents() public méthode

Returns an enumerable collection of Rock.Model.Location">Locations that are descendants of a
public GetAllDescendents ( int parentLocationId ) : IEnumerable
parentLocationId int A representing the Id of the
Résultat IEnumerable

GetByDevice() public méthode

Gets the locations associated to a device and optionally any child locaitons
public GetByDevice ( int deviceId, bool includeChildLocations = true ) : IEnumerable
deviceId int The device identifier.
includeChildLocations bool if set to true [include child locations].
Résultat IEnumerable

GetByGeoFence() public méthode

Returns the first Rock.Model.Location with a GeoFence that matches the specified GeoFence.
public GetByGeoFence ( System.Data.Entity.Spatial.DbGeography fence ) : Location
fence System.Data.Entity.Spatial.DbGeography A object that /// represents the GeoFence of the location to retrieve.
Résultat Location

GetByGeoPoint() public méthode

Returns a Rock.Model.Location by GeoPoint. If a match is not found, a new Location will be added based on the Geopoint.
public GetByGeoPoint ( System.Data.Entity.Spatial.DbGeography point ) : Location
point System.Data.Entity.Spatial.DbGeography A object /// representing the Geopoint for the location.
Résultat Location

GetCampusIdForLocation() public méthode

Gets the CampusID associated with the Location from the location or from the location's parent path
public GetCampusIdForLocation ( int locationId ) : int?
locationId int The location identifier.
Résultat int?

GetPath() public méthode

Gets the path.
public GetPath ( int locationId ) : string
locationId int The location identifier.
Résultat string

Verify() public méthode

Performs Address Verification on the provided Rock.Model.Location.
public Verify ( Location location, bool reVerify ) : bool
location Location A to verify.
reVerify bool if set to true [re verify].
Résultat bool