C# Класс Rock.Model.LocationService

Data access and service class for Rock.Model.Location entities.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Описание методов

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

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].
Результат Location

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

Gets all ancestor ids.
public GetAllAncestorIds ( int locationId ) : IEnumerable
locationId int The location identifier.
Результат IEnumerable

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

Gets all ancestors.
public GetAllAncestors ( int locationId ) : IEnumerable
locationId int The location identifier.
Результат IEnumerable

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

Gets all descendent ids.
public GetAllDescendentIds ( int parentLocationId ) : IEnumerable
parentLocationId int The parent location identifier.
Результат IEnumerable

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

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
Результат IEnumerable

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

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].
Результат IEnumerable

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

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.
Результат Location

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

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.
Результат Location

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

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.
Результат int?

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

Gets the path.
public GetPath ( int locationId ) : string
locationId int The location identifier.
Результат string

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

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].
Результат bool