CosmosExtensionsGetRelevantGeofencesT Method

Retrieves all geofences that are relevant to the item, including those from its parent environment and ancestors if includingParentItems is set.

Definition

Namespace: MobileTrack.DataContainers.Extensions
Assembly: MobileTrack.DataContainers (in MobileTrack.DataContainers.dll) Version: 0.8+34f1bbd8dc6b32752cfce829cbed66e15113d7ba
public static Task<Dictionary<Guid, List<GeofenceDto>>> GetRelevantGeofences<T>(
	this IAzureCosmosDb cosmosDb,
	CompanyDto company,
	T item,
	bool includingParentItems,
	CancellationToken cancellationToken
)
where T : IHasEnvironment, IHasGeofences, IHasLocation

Parameters

cosmosDb  IAzureCosmosDb
Cosmos DB Interop
company  CompanyDto
Company the item belongs to.
item  T
Item to start from
includingParentItems  Boolean
Whether to include geofences of parent environments.
cancellationToken  CancellationToken
Cancellation token.

Type Parameters

T
Item type to start from (Usually an EnvironmentDto or DeviceDto)

Return Value

TaskDictionaryGuid, ListGeofenceDto
All relevant geofences.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IAzureCosmosDb. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also